package system;

public class Teacher extends Person {
    private Course teachingCourse;

    // 需要构造方法
    public Teacher(String id, String name, String gender) {
        super(id, name, gender);
    }

    public void assignCourse(Course course) {
        this.teachingCourse = course;
        course.setTeacher(this);  // 现在这个方法存在了
    }

    public Course getTeachingCourse() {
        return teachingCourse;
    }
}